home *** CD-ROM | disk | FTP | other *** search
- $EXP_INCLUDE "updown.js"
- <SCRIPT LANGUAGE="JavaScript">
- <!--
- function switchPosition(first, second) {
- if (document.forms[0].sort != null)
- document.forms[0].sort.checked = false;
- tmp_value = document.forms[0].sl.options[second].value;
- tmp_text = document.forms[0].sl.options[second].text;
- document.forms[0].sl.options[second].value = document.forms[0].sl.options[first].value;
- document.forms[0].sl.options[second].text = document.forms[0].sl.options[first].text;
- document.forms[0].sl.options[first].value = tmp_value;
- document.forms[0].sl.options[first].text= tmp_text;
- document.forms[0].sl.selectedIndex = first;
- }
-
- var button = "order";
- // if submit flag is true, this will submit the form
- function handleSubmit() {
- param = "";
- //Alert the user if it is remove category request
- if (button =="removeOp"){
- if (! confirm('Are you sure you want to remove the selected items?'))
- return false;
- }
- // in sequence
- for(i=0; i< document.forms[0].sl.options.length; i++) {
- param = param + "&seq=" + document.forms[0].sl.options[i].value;
- if (document.forms[0].sl.options[i].selected) {
- param = param + "&sl=" + document.forms[0].sl.options[i].value;
- }
- }
- for(i=0; i< document.forms[0].nsl.options.length; i++) {
- if (document.forms[0].nsl.options[i].selected) {
- param = param + "&nsl=" + document.forms[0].nsl.options[i].value;
- }
- }
-
- if (document.forms[0].sort != null)
- sort_param = "&sort=" + (document.forms[0].sort.checked?"1":"0");
- else
- sort_param = "";
- if (document.forms[0].catid == null) {
- self.location = document.forms[0].action+ "?" +button+"=1" + param + sort_param;
- ;
- }
- else {
- self.location = document.forms[0].action+ "?" +button+"=1" + param + "&catid=" + document.forms[0].catid.options[document.forms[0].catid.selectedIndex].value +
- sort_param;
- }
-
- return false;
-
- }
- //-->
-
- </SCRIPT>
-